<?php

require_once('interfaces/Model.interface.php');

class SimpleModel implements Model{

    private $lookupArray;

    public function SimpleModel($setArray = array()){
        $this->lookupArray = $setArray;
    }

    public function get($lookupKey){
        return array_key_exists($lookupKey,$this->lookupArray) ? $this->lookupArray[$lookupKey] : null;
    }

    public function hasKey($lookupKey){
        return array_key_exists($lookupKey,$this->lookupArray) && $this->lookupArray[$lookupKey] != null;
    }

    public function put($lookupKey, $value){
        return $this->lookupArray[$lookupKey] = $value;
    }

    public function putDefault($lookupKey, $value){
        return $this->lookupArray[$lookupKey] = $value;
    }

}

?>